FROM ubuntu:latest

RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list

RUN apt-get update

RUN apt-get install -y mysql-client libmysqlclient-dev

RUN apt-get install -y build-essential

WORKDIR /app

COPY . /app

RUN g++ -o out/server server.cpp -lmysqlclient